program PI2;

{$APPTYPE CONSOLE}

var
  i, n, n0, a: integer;
  x, y: real;
  fout: textFile;

begin
  n0:=0;
  n:=0;
  i:=1;
  while (i=1)     do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1.0) then
      n0:=n0+1;
    n:=n+1;
    if ( ( ( (4*n0) /n) )=( 3.1415 )) then
      i:=2;
  end;
    write(n);
    readln;
  //close(fout);
end.

